// A param screen — the target of the `/orders/:id` deep link (see
// ../../lib/deeplinks.ts). Tapping a note, a universal link, or a push whose
// payload carried `data.deepLink: '/orders/<id>'` all land here through the one
// typed link table.
import { useLocalSearchParams } from 'expo-router'
import { Text, View } from 'react-native'

export default function OrderDetail() {
  const { id } = useLocalSearchParams<{ id: string }>()
  return (
    <View style={{ flex: 1, padding: 16, gap: 8 }}>
      <Text style={{ fontSize: 20, fontWeight: '700' }}>Order {id}</Text>
      <Text style={{ color: '#666' }}>
        Reached via the typed deep-link table. Fetch this order with
        {' '}useSubscription('orders.get', {'{'} id {'}'}) from ../../lib/api.
      </Text>
    </View>
  )
}
